from configparser import ConfigParser
import os
from ui_auto2.config.config import *

class Read_ini(ConfigParser):
    def __init__(self,file):
        super(Read_ini, self).__init__()
        self.read(file,encoding="utf-8")
    def read_ini_data(self,section,option):
        values=self.get(section,option)
        return values

if __name__ == '__main__':
    file1=os.path.join(data_path,"data.ini")
    r=Read_ini(file1)
    print(r.read_ini_data("test_data","username"))
    print(r.read_ini_data("test_data", "password"))
    print(r.read_ini_data("test_data", "url"))